package com.basker.pisces.core.query.meta;

import java.util.ArrayList;

public class FieldDescCollection extends ArrayList<FieldDesc> {

    private static final long serialVersionUID = 3262186081018768173L;
    private TableDesc table;

    public FieldDescCollection(TableDesc table) {
        this.table = table;
    }

    @Override
    public boolean add(FieldDesc field) {
        field.setHostTable(this.table);
        return super.add(field);
    }

    @Override
    public void add(int index, FieldDesc field) {
        super.add(index, field);
        field.setHostTable(this.table);
    }

}
